<template>
  <div class="overview-tabs">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane name="one">
        <div slot="label" class="tab-label" @click="tab(1)">汇率管理</div>
        <overview  v-if="active == 1"/>
      </el-tab-pane>
      <el-tab-pane name="two">
        <div slot="label" class="tab-label" @click="tab(2)">地址录入</div>
        <lease v-if="active == 2"/>
      </el-tab-pane>
      <el-tab-pane name="three">
        <div slot="label" class="tab-label" @click="tab(3)">财务明细</div>
        <rental v-if="active == 3"/>
      </el-tab-pane>
      <el-tab-pane name="four">
        <div slot="label" class="tab-label" @click="tab(4)">维修类目</div>
        <category v-if="active == 4" />
      </el-tab-pane>
      <el-tab-pane name="five">
        <div slot="label" class="tab-label" @click="tab(5)">缴费类目</div>
        <pay v-if="active == 5"/>
      </el-tab-pane>
      <el-tab-pane name="six">
        <div slot="label" class="tab-label" @click="tab(6)">房产标签</div>
        <houTag v-if="active == 6"/>
      </el-tab-pane>
      <el-tab-pane name="seven">
        <div slot="label" class="tab-label" @click="tab(7)">业主标签</div>
        <ownerTag v-if="active == 7"/>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import overview from './overview'
import lease from './lease'
import rental from './rental'
import category from './category'
import pay from './pay'
import houTag from './houTag'
import ownerTag from './ownerTag'
export default {
  components: { overview, lease, rental, category, pay, houTag, ownerTag },
  data() {
    return {
      activeName: 'one',
      active:1
    }
  },
  methods: {
    handleClick(tab, event) {
      console.log(tab, event)
    },
    tab(v){
      this.active = v
    }
  }
}
</script>

<style lang="scss">
.overview-tabs {
  .el-tabs {
    .el-tabs__nav-wrap::after {
      height: 1px;
    }
  }

  .el-tabs__content {
    padding: 17px;
  }
}
</style>

<style lang="scss" scoped>
.overview-tabs {
  padding: 10px;
}

.tab-label {
  width: 76px;
  text-align: center;
  font-size: 14px;
  font-weight: normal;
}
</style>
